package com.base.pig.controller;

import com.base.pig.util.R;
import com.base.pig.service.ScLayerService;


import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 图层管理Controller
 */
@RestController
@RequestMapping("/layer")
@Api(value = "dict", tags = "图层管理")
public class ScLayerController {
    // lineList:管线list  pointList:管点list   lineTree:管线tree pointTree:管点tree allTree：所有图层tree
    @Autowired
    private ScLayerService scLayerService;

    @PostMapping("/queryLength")
    public R queryLength(@RequestBody String ids) {
        return R.ok(scLayerService.queryLength(ids));
    }

    @GetMapping("/allTree")
    public R allTree() {
        return R.ok(scLayerService.allTree());
    }

    @GetMapping("/layerList")
    public R typeTree() {
        return R.ok(scLayerService.typeTree());
    }

    /**
     * @return com.pig4cloud.pig.common.core.util.R
     * @Title constructionTree
     * @Description 获取三维施工图层
     * @author zgq
     * @date 2020/8/21 16:40
     * @UpdateUser
     * @UpdateDate
     * @UpdateRemark
     */
    @GetMapping("constructionTree")
    public R constructionTree() {
        return R.ok(scLayerService.constructionTree());
    }
}
